package biz.ezcom.design.pattern.strategy;

public class Client {
	public static void main(String[] args) {
		//不打折
		Context contextNormal = new Context(Strategy.NOMARL);
		double resultNormal = contextNormal.getResultCash(1000);
		System.out.println(resultNormal);
		//打８折
		Context contextRebate = new Context(Strategy.REBATE);
		double resultRebate = contextRebate.getResultCash(1000);
		System.out.println(resultRebate);
		//满300返100
		Context contextReturn = new Context(Strategy.RETURN);
		double resultReturn = contextReturn.getResultCash(1000);
		System.out.println(resultReturn);
	}
}
